package com.example.demo.service;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demo.entity.TblAsset;
import com.example.demo.mapper.asset.TblAssetMapper;
import com.example.demo.vo.AssetInfoResponse;
import com.github.yulichang.toolkit.JoinWrappers;
import com.github.yulichang.wrapper.MPJLambdaWrapper;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class TblAssetService extends ServiceImpl<TblAssetMapper, TblAsset> {
	public AssetInfoResponse queryAssetInfoResponseInfoWithGoodsId(String goodsId) {
		MPJLambdaWrapper<TblAsset> query = JoinWrappers.lambda(TblAsset.class).eq(TblAsset::getGoodsId, goodsId);
		AssetInfoResponse one = query.one(AssetInfoResponse.class);
		return one;
	}
}
